class game_config:
    def __init__(self):
        self.callsign = ""
        self.game_name = ""
        self.game_max_players = 4
        self.game_port = 0
        self.host = False
        self.options = {}
        self.game_host = None
        self.local_player = None
        self.max_kills = 0
    
    def load_cfg_file(self, path):
        f = open(path)
        content = f.readlines()
        f.close()
        
        for line in content:
            parts = line.split("=")
            self.options[parts[0]] = parts[1].replace("\n", "")
        
        if self.options['resolution']:
            res = self.options['resolution']
            (w, h) = res.split("x")
            h = int(h)
            w = int(w)
            self.options['resolution'] = (w, h)
